# coding = UTF-8
from django.db import models
from django.contrib.auth.models import User

class Scene(models.Model):
	relate_rooms = models.ManyToManyField('Scene')

class UserDetail(User):
	cn_name = models.CharField(max_length = 64)
	scene = models.ForeignKey(Scene)

class Property(models.Model):
	TYPE_CHOICES = (
		(1,u'int'),
		(2,u'str'),
		(3,u'date'),
	)
	name = models.CharField(max_length = 64)
	desc = models.CharField(max_length = 64)
	value = models.CharField(max_length = 128)
	type = models.IntegerField(choices = TYPE_CHOICES)
	owner = models.ForeignKey(UserDetail)


